<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>超级居中：place-items: center</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .parent {
      display: grid;
      place-items: center;
      width: 100%;
      height: 100vh;
      background: yellowgreen;
    }

    .child {
      width: 200px;
      height: 200px;
      background: purple;
      color: #fff;
    }
  </style>
</head>

<body>
  <div class="parent">
    <div class="child">place-items 是同时设置 align-items 和 justify-items 的快速方法</div>
  </div>
</body>

</html>